package sms;

public class Person {
	//父类

	private String per_addr;//地址
	private String per_name;//名字
	private String per_sex;//性别
	private int per_age;//年龄

	//设置方法
	public  void  set_addr (String a){per_addr=a;}
	public  void  set_name (String n){per_name=n;}
	public  void  set_sex (String s){per_sex=s;}
	public  void  set_age (int ag){per_age=ag;}
	//获得方法
	public  String  get_per_addr(){  return per_addr;  }
	public  String  get_per_name(){  return per_name;  }
	public  String  get_per_sex(){   return per_sex;   }
	public  int  get_per_age(){      return per_age;   }
	//1无参数构造方法
	Person( ){  }

	//2--2参数构造方法
	Person( String  name, String  sex){
		per_name=name;
		per_sex=sex;
	}
	//4参数构造方法
	Person( String  addr  ,String  name, String  sex,  int  age  ){
		per_addr=addr;
		per_name=name;
		per_sex=sex;
		per_age = age;
	}
	public void  show(  ){
		System.out.println("地址："+get_per_addr());
		System.out.println("姓名："+get_per_name());
		System.out.println("性别："+get_per_sex());
		System.out.println("年龄："+get_per_age());
	}
}
